3.2.14 \(\int \frac {A+B \tan (e+f x)+C \tan ^2(e+f x)}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}} \, dx\) [114]

Optimal. Leaf size=210 \[ -\frac {(i A+B-i C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{(a-i b) \sqrt {c-i d} f}-\frac {(A+i B-C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{(i a-b) \sqrt {c+i d} f}-\frac {2 \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\sqrt {b} \left (a^2+b^2\right ) \sqrt {b c-a d} f} \]

[Out]

-(I*A+B-I*C)*arctanh((c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2))/(a-I*b)/f/(c-I*d)^(1/2)-(A+I*B-C)*arctanh((c+d*tan(
f*x+e))^(1/2)/(c+I*d)^(1/2))/(I*a-b)/f/(c+I*d)^(1/2)-2*(A*b^2-a*(B*b-C*a))*arctanh(b^(1/2)*(c+d*tan(f*x+e))^(1
/2)/(-a*d+b*c)^(1/2))/(a^2+b^2)/f/b^(1/2)/(-a*d+b*c)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.41, antiderivative size = 210, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 6, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {3734, 3620, 3618, 65, 214, 3715} \begin {gather*} -\frac {2 \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\sqrt {b} f \left (a^2+b^2\right ) \sqrt {b c-a d}}-\frac {(i A+B-i C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{f (a-i b) \sqrt {c-i d}}-\frac {(A+i B-C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{f (-b+i a) \sqrt {c+i d}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2)/((a + b*Tan[e + f*x])*Sqrt[c + d*Tan[e + f*x]]),x]

[Out]

-(((I*A + B - I*C)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d]])/((a - I*b)*Sqrt[c - I*d]*f)) - ((A + I*B -
 C)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c + I*d]])/((I*a - b)*Sqrt[c + I*d]*f) - (2*(A*b^2 - a*(b*B - a*C))*
ArcTanh[(Sqrt[b]*Sqrt[c + d*Tan[e + f*x]])/Sqrt[b*c - a*d]])/(Sqrt[b]*(a^2 + b^2)*Sqrt[b*c - a*d]*f)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 3618

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[c*(
d/f), Subst[Int[(a + (b/d)*x)^m/(d^2 + c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] &&
NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]

Rule 3620

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[(c
 + I*d)/2, Int[(a + b*Tan[e + f*x])^m*(1 - I*Tan[e + f*x]), x], x] + Dist[(c - I*d)/2, Int[(a + b*Tan[e + f*x]
)^m*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0]
&& NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]

Rule 3715

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.)*((A_) + (C_.)*
tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Dist[A/f, Subst[Int[(a + b*x)^m*(c + d*x)^n, x], x, Tan[e + f*x]], x]
 /; FreeQ[{a, b, c, d, e, f, A, C, m, n}, x] && EqQ[A, C]

Rule 3734

Int[(((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (
f_.)*(x_)]^2))/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Dist[1/(a^2 + b^2), Int[(c + d*Tan[e + f*
x])^n*Simp[b*B + a*(A - C) + (a*B - b*(A - C))*Tan[e + f*x], x], x], x] + Dist[(A*b^2 - a*b*B + a^2*C)/(a^2 +
b^2), Int[(c + d*Tan[e + f*x])^n*((1 + Tan[e + f*x]^2)/(a + b*Tan[e + f*x])), x], x] /; FreeQ[{a, b, c, d, e,
f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] &&  !GtQ[n, 0] &&  !LeQ[n, -
1]

Rubi steps

\begin {align*} \int \frac {A+B \tan (e+f x)+C \tan ^2(e+f x)}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}} \, dx &=\frac {\int \frac {b B+a (A-C)-(A b-a B-b C) \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{a^2+b^2}+\frac {\left (A b^2-a b B+a^2 C\right ) \int \frac {1+\tan ^2(e+f x)}{(a+b \tan (e+f x)) \sqrt {c+d \tan (e+f x)}} \, dx}{a^2+b^2}\\ &=\frac {(A-i B-C) \int \frac {1+i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{2 (a-i b)}+\frac {(A+i B-C) \int \frac {1-i \tan (e+f x)}{\sqrt {c+d \tan (e+f x)}} \, dx}{2 (a+i b)}+\frac {\left (A b^2-a b B+a^2 C\right ) \text {Subst}\left (\int \frac {1}{(a+b x) \sqrt {c+d x}} \, dx,x,\tan (e+f x)\right )}{\left (a^2+b^2\right ) f}\\ &=-\frac {(i (A+i B-C)) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {c+i d x}} \, dx,x,-i \tan (e+f x)\right )}{2 (a+i b) f}+\frac {(i A+B-i C) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {c-i d x}} \, dx,x,i \tan (e+f x)\right )}{2 (a-i b) f}+\frac {\left (2 \left (A b^2-a b B+a^2 C\right )\right ) \text {Subst}\left (\int \frac {1}{a-\frac {b c}{d}+\frac {b x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{\left (a^2+b^2\right ) d f}\\ &=-\frac {2 \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\sqrt {b} \left (a^2+b^2\right ) \sqrt {b c-a d} f}-\frac {(A-i B-C) \text {Subst}\left (\int \frac {1}{-1-\frac {i c}{d}+\frac {i x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{(a-i b) d f}-\frac {(A+i B-C) \text {Subst}\left (\int \frac {1}{-1+\frac {i c}{d}-\frac {i x^2}{d}} \, dx,x,\sqrt {c+d \tan (e+f x)}\right )}{(a+i b) d f}\\ &=-\frac {(i A+B-i C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{(a-i b) \sqrt {c-i d} f}-\frac {(A+i B-C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{(i a-b) \sqrt {c+i d} f}-\frac {2 \left (A b^2-a (b B-a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\sqrt {b} \left (a^2+b^2\right ) \sqrt {b c-a d} f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.29, size = 194, normalized size = 0.92 \begin {gather*} \frac {\frac {(-i a+b) (A-i B-C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d}}\right )}{\sqrt {c-i d}}+\frac {(i a+b) (A+i B-C) \tanh ^{-1}\left (\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {c+i d}}\right )}{\sqrt {c+i d}}-\frac {2 \left (A b^2+a (-b B+a C)\right ) \tanh ^{-1}\left (\frac {\sqrt {b} \sqrt {c+d \tan (e+f x)}}{\sqrt {b c-a d}}\right )}{\sqrt {b} \sqrt {b c-a d}}}{\left (a^2+b^2\right ) f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2)/((a + b*Tan[e + f*x])*Sqrt[c + d*Tan[e + f*x]]),x]

[Out]

((((-I)*a + b)*(A - I*B - C)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c - I*d]])/Sqrt[c - I*d] + ((I*a + b)*(A +
I*B - C)*ArcTanh[Sqrt[c + d*Tan[e + f*x]]/Sqrt[c + I*d]])/Sqrt[c + I*d] - (2*(A*b^2 + a*(-(b*B) + a*C))*ArcTan
h[(Sqrt[b]*Sqrt[c + d*Tan[e + f*x]])/Sqrt[b*c - a*d]])/(Sqrt[b]*Sqrt[b*c - a*d]))/((a^2 + b^2)*f)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(3760\) vs. \(2(179)=358\).
time = 0.53, size = 3761, normalized size = 17.91

method result size
derivativedivides \(\text {Expression too large to display}\) \(3761\)
default \(\text {Expression too large to display}\) \(3761\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(c+d*tan(f*x+e))^(1/2)/(a+b*tan(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

1/f*(2/(a^2+b^2)*(1/4/d^2/(c^2+d^2)^(3/2)*(-1/2*(A*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d^2)^(1/2)*a*c^2*d+A*(2*
(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d^2)^(1/2)*b*c*d^2-B*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d^2)^(1/2)*a*c^3+B*(2*
(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d^2)^(1/2)*b*d^3-B*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*a*c^2*d^2-B*(2*(c^2+d^2)^(1/2
)+2*c)^(1/2)*b*c^3*d-B*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*b*c*d^3-A*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d^2)^(3/2)*b
*c+A*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d^2)^(1/2)*a*d^3+A*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d^2)^(1/2)*b*c^3
-A*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*a*c^3*d-A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*c^2*d+A*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d^2)^(1/2)*b*c*d^
2-B*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d^2)^(1/2)*a*c^3+B*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^2+d^2)^(1/2)*b*d^3-
B*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*a*c^2*d^2-B*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*b*c^3*d-B*(2*(c^2+d^2)^(1/2)+2*c)^(1
/2)*b*c*d^3-A*(2*(c^2+d^2)^(1/2)+2*c)^(1/2)*(c^...

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(c+d*tan(f*x+e))^(1/2)/(a+b*tan(f*x+e)),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(a*d-b*c>0)', see `assume?` for
 more detail

________________________________________________________________________________________

Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(c+d*tan(f*x+e))^(1/2)/(a+b*tan(f*x+e)),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A + B \tan {\left (e + f x \right )} + C \tan ^{2}{\left (e + f x \right )}}{\left (a + b \tan {\left (e + f x \right )}\right ) \sqrt {c + d \tan {\left (e + f x \right )}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(f*x+e)+C*tan(f*x+e)**2)/(c+d*tan(f*x+e))**(1/2)/(a+b*tan(f*x+e)),x)

[Out]

Integral((A + B*tan(e + f*x) + C*tan(e + f*x)**2)/((a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x))), x)

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(c+d*tan(f*x+e))^(1/2)/(a+b*tan(f*x+e)),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Warning, need to choose a branch for the root of a polynomial with parameters. This might be wrong.The choi
ce was done

________________________________________________________________________________________

Mupad [B]
time = 69.14, size = 2500, normalized size = 11.90 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*tan(e + f*x) + C*tan(e + f*x)^2)/((a + b*tan(e + f*x))*(c + d*tan(e + f*x))^(1/2)),x)

[Out]

(log((((((((((128*C*b^2*d^8*(a*d + b*c)^2*(a^2 + b^2)^2)/f - 64*b^2*d^8*(a^2 + b^2)^2*(c + d*tan(e + f*x))^(1/
2)*((4*(-C^4*f^4*(a^2*d - b^2*d + 2*a*b*c)^2)^(1/2) - 4*C^2*a^2*c*f^2 + 4*C^2*b^2*c*f^2 + 8*C^2*a*b*d*f^2)/(f^
4*(a^2 + b^2)^2*(c^2 + d^2)))^(1/2)*(3*b^3*c^2 + 2*b^3*d^2 - a^2*b*c^2 - 2*a^2*b*d^2 + a^3*c*d + a*b^2*c*d))*(
(4*(-C^4*f^4*(a^2*d - b^2*d + 2*a*b*c)^2)^(1/2) - 4*C^2*a^2*c*f^2 + 4*C^2*b^2*c*f^2 + 8*C^2*a*b*d*f^2)/(f^4*(a
^2 + b^2)^2*(c^2 + d^2)))^(1/2))/4 + (64*C^2*b*d^8*(c + d*tan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*c^2 + 2*b^3*d^2 - a^2*b*c^2 - 2*a^2*b*d^2 + a^3*c*d
 + a*b^2*c*d))*(-(4*(-C^4*f^4*(a^2*d - b^2*d + ...

________________________________________________________________________________________